﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000037 RID: 55
	public class UInt16Formatter : IMessagePackFormatter<ushort>
	{
		// Token: 0x060000CB RID: 203 RVA: 0x0000423B File Offset: 0x0000263B
		private UInt16Formatter()
		{
		}

		// Token: 0x060000CC RID: 204 RVA: 0x00004243 File Offset: 0x00002643
		public int Serialize(ref byte[] bytes, int offset, ushort value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteUInt16(ref bytes, offset, value);
		}

		// Token: 0x060000CD RID: 205 RVA: 0x0000424D File Offset: 0x0000264D
		public ushort Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadUInt16(bytes, offset, out readSize);
		}

		// Token: 0x0400002B RID: 43
		public static readonly UInt16Formatter Instance = new UInt16Formatter();
	}
}
